package org.yellow.backend.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.yellow.backend.mapper.recordsMapper;
import org.yellow.backend.pojo.medicalrecords;

/**
 * @author: hy
 * @create: 2024-01-01
 */
@Service
public class recordsService {
    @Autowired
    recordsMapper mapper;

    /**
     * 根据id查询病历
     * @param id
     * @return
     */
    public medicalrecords selectRecordById(int id){
        return mapper.selectById(id);
    }

    /**
     * 添加新病历
     * @param record
     * @return
     */
    public boolean insertNewRecord(medicalrecords record){
        mapper.insertNew(record);
        return true;
    }




}
